package com.swak.frame.ratelimit.annotation;

import org.springframework.boot.context.properties.ConfigurationProperties;

import com.swak.frame.SwakConstants;
import com.swak.frame.ratelimit.LimitType;

@ConfigurationProperties(prefix = SwakConstants.SWAK_RATE_LIMIT)
public class RateLimitProperties {
	
	/**
	 * 排序 {@link @Ordered}
	 */
	private int order = SwakConstants.ORDER_PRECEDENCE+1;

	/**
	 * 限流类型 {@link com.swak.frame.ratelimit.LimitType}
	 */
	private LimitType type;

	/**
	 * 是否支持动态限流
	 */
	private boolean dynamic;

	public int getOrder() {
		return order;
	}

	public void setOrder(int order) {
		this.order = order;
	}

	public LimitType getType() {
		return type;
	}

	public void setType(LimitType type) {
		this.type = type;
	}

	public boolean isDynamic() {
		return dynamic;
	}

	public void setDynamic(boolean dynamic) {
		this.dynamic = dynamic;
	}
}
